package com.bidevalution.business.service;

import com.bidevalution.dao.entity.ExpertWarnMsgVo;
import com.qtp.core.model.Response;

import java.util.List;
import java.util.Map;

/**
 * 中标结果页面相关接口
 * Created by glodon on 2019-11-19.
 */
public interface BeBidResultService {
    /**
     * 查询项目信息
     * @param sectionId
     * @return
     * @throws Exception
     */
    Map<String, Object> getProjectInfo(String sectionId) throws Exception;

    /**更新项目信息
     * @param map
     * @return
     * @throws Exception
     */
    void updateProjectInfo(Map<String, Object> map) throws Exception;
    /**
     * 获取中标单位信息
     * @param sectionId
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> getBidInfoList(String sectionId) throws Exception;

    /**
     * 获取中标单位业绩信息
     * @param enterpriseId
     * @param performanceType 业绩类型 0，资格，1 评分
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> getBidPerformanceList(String enterpriseId, String performanceType) throws Exception;

    /**更新投标单位信息
     * @param map
     * @return
     * @throws Exception
     */
    void updateBidInfoList(List<Map<String, Object>> map) throws Exception;
    /**
     * 更新中标单位业绩信息
     * @param map
     * @return
     * @throws Exception
     */
    void updateBidPerformanceList(List<Map<String, Object>> map) throws Exception;

    /**
     * 保存中标单位业绩信息
     * @param map map
     * @return Response
     */
    Response saveBidPerformanceList(List<Map<String, Object>> map);

    /**
     * 查询是否需要业绩
     * @param sectionId sectionId
     * @return Response
     */
    Response isProjPerf(String sectionId);

    /**
     * 查询否决投标单位的原因及依据
     * @param sectionId
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> getUnpassedEnterpriseList(String sectionId) throws Exception;

    /**
     * 查询评标专家公示
     * @param sectionId
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> getSectionExpertList(String sectionId) throws Exception;

    /**
     * 查询专家评分情况
     * @param sectionId
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> getExpertScoreList(String sectionId) throws Exception;

    /**
     * 中标结果推送
     * @param sectionId
     * @return
     * @throws Exception
     */
    Response<String> pushBidResult(String sectionId) throws Exception;

    /**
     * @Description 新增业绩信息
     * @date 2020-02-19 17:43
     * @author lhl
     */
    boolean insertPerformance(Map<String,Object> params) throws Exception;

    /**
     * 删除业绩
     * @param performanceIds
     * @return
     * @throws Exception
     */
    void delPerformances(String performanceIds)throws Exception;

    /**
     * 获取业绩文件路径
     * @param sectionEnterpriseId
     * @return
     */
    String getPerformanceFilePath(String sectionEnterpriseId,String atfiAnnexType);

    /**
     * 获取排名异常信息
     * @param sectionStepId
     * @return
     */
    List<ExpertWarnMsgVo> getRankErrorInfo(String sectionStepId);

    /**
     * 获取当前环节有废标情况下的有效单位数量
     * @param sectionStepId
     * @return
     */
    Integer getStandardUnitNum(String sectionStepId, String columnName);

    /**
     * 获取商务评审这类无最终结果，并且不会有废标情况下的有效单位数量
     * @param sectionStepId
     * @return
     */
    Integer getStandardUnitNumByBusiness(String sectionStepId);

    /**
     * 获取中标候选人数量
     *
     * @param sectionId
     * @return
     * @throws Exception
     */
    Integer getCandidateNum(String sectionId) throws Exception;

}
